﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PaperWorld.ORM
{
    public sealed class DataContext : IDataContext
    {
        private static EntityContainer container = null;

        private static object obj = new Object();

        public EntityContainer GetContext()
        {
            if (container == null)
            {
                lock (obj)
                {
                    if (container == null)
                    {
                        container = new EntityContainer();
                    }
                }
            }
            return container;
        }
    }
}
